﻿Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Data.SqlClient
Imports System.Text
Imports System.Data
Namespace OAMS.DAO
    Public Class BaseDAO
        '''' <summary>
        '''' 取得AUO的資料庫
        '''' </summary>
        '''' <returns></returns>
        '''' <remarks></remarks>
        'Public Function MyConn() As SqlConnection
        '    Dim dbName As String = DBSetting.GetDBName("", "", "")
        '    Dim myConn__1 As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings(dbName).ConnectionString)
        '    Return myConn__1
        'End Function
        ''' <summary>
        ''' 取得AUO的資料庫
        ''' </summary>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function MyConn(ByVal Param1 As String) As SqlConnection
            Dim dbName As String = DBSetting.GetDBName(Param1, "", "")
            Dim myConn__1 As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings(dbName).ConnectionString)
            Return myConn__1
        End Function
        Public Function MyConn_CHT(ByVal Param1 As String) As SqlConnection
            Dim dbName As String = DBSetting.GetDBName(Param1, "", "")
            Dim myConn__1 As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings(dbName + "_CHT").ConnectionString)
            Return myConn__1
        End Function

        Public Function MyConn_PHS(ByVal Param1 As String) As SqlConnection
            Dim dbName As String = DBSetting.GetDBName(Param1, "", "")
            Dim myConn__1 As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("PHS").ConnectionString)
            Return myConn__1
        End Function

    End Class
End Namespace

